<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>块级作用域</li>
        <li>无变量提升</li>
        <li>暂时性死区：代码块中，在使用let申明变量之前，不能使用该变量(运行时错误)</li>
        <li>不能重复声明同名变量（编译期错误）</li>
        <li>全局变量、与window对象脱钩</li>
    </ul>
</body>
<script>
    function show() {
        // console.log("a = ",a);
        let a = 20;
        for (let i = 0;i < 10;i ++) {

        }
        // let b = 1;
        // let b = 2;
    }

    show();

    var c = 100;
    alert(window.c);

    let d = 100;
    alert(window.d);
</script>
</html>